#include <GraphicsDevice.h>
#include <GraphicsLibrary.h>
#include "stdio.h"
#include <list>


int main()
{
	GraphicsDevice gd(640, 480);
	GraphicsLibrary gl(gd);
	Point2 a(100, 10);
	Point2 b(10, 100);
	a.ValueArray = { 255,0,0 };
	b.ValueArray = { 0,255,0 };
	//gl.SingleInterpolationIn2D(a, b, c);

	gl.draw_colorful_line(a, b);

	Point2 c(10, 10);
	Point2 d(100, 50);
	c.ValueArray = { 255,0,0 };
	d.ValueArray = { 0,0,255 };
	gl.draw_colorful_line(c, d);

	Point2 a2(10, 10);
	Point2 b2(40, 140);
	Point2 c2(10, 180);
	Point2 d2(150, 200);
	a2.ValueArray = { 255,0,0 };
	b2.ValueArray = { 0,255,0 };
	c2.ValueArray = { 0,0,255 };
	d2.ValueArray = { 255,255,0 };
	gl.MultipleInterpolationArrayIn2D(a2, b2, c2,3,
		[](std::vector<double>& vs) {
			return RGB((int)vs[0], (int)vs[1], (int)vs[2]);
		}
	);

	getchar();
	return 0;
}